using Services;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HUD_SectIcon : MonoBehaviour
{
    private Image icon;
    private Player player;
    [SerializeField]
    private List<Sprite> sprites = new List<Sprite>();

    private void Start()
    {
        icon = GetComponent<Image>();
        player = ServiceLocator.Get<ActionController>().player;
        OnStatusChange();
        player.StatusChange += OnStatusChange;
    }

    private void OnStatusChange()
    {
        icon.sprite = sprites[(int)player.sect];
    }
}
